ed15ca9aca5d31fab9c58e322e8b4173565d13ea,core/kernel/source/jetbrains/mps/smodel/LanguageHierarchyCache.java,LanguageHierarchyCache,getAncestorsNames_internal,#String#,172
Before Change
if (result != null) {
return result;
} else {
return NodeReadAccessCasterInEditor.runReadTransparentAction(new Computable<Set<String>>() {
public Set<String> compute() {
Set<String> result = new HashSet<String>();
collectAncestorNames(conceptFqName, result);
myAncestorsNamesMap.put(conceptFqName, result);
return result;
}
});
}
}
After Change
synchronized (myAncestorsLock) {
Set<String> result = myAncestorsNamesMap.get(conceptFqName);
if (result == null) {
result = NodeReadAccessCasterInEditor.runReadTransparentAction(new Computable<Set<String>>() {
public Set<String> compute() {
Set<String> result = new HashSet<String>();
collectAncestorNames(conceptFqName, result);
return result;
}
});
myAncestorsNamesMap.put(conceptFqName, result);
}
return result;
}
}